import router  from "@/router/index.js";

//校验按钮权限
export function checkPermission(permission) {
    const permissions = router.currentRoute.value.meta.btnPermissions || [];
    if (permission) {
        return permissions.includes(permission);
    } else {
        return true;
    }
}